﻿package ui;


import java.rmi.RemoteException;

import javax.swing.JLabel;
import javax.swing.JPanel;

import main.Main;
import vo.generalManager.LoginPanelVO;

import components.MyButton;
import components.MyFrame;
import components.MyPanel;



public class MainPanel extends MyPanel {

	private MyButton logoutButton;
	private MyButton returnbackButton;
	
	private JLabel selectionLabel;
	private MyButton setPromotionButton;
	private MyButton setSalesStrategyButton;

	protected void initComponent() {
		this.setBounds(400, 200, 300, 300);
		
		logoutButton = new MyButton("注销");
		returnbackButton = new MyButton("返回");
		logoutButton.setBounds(MyFrame.WIDTH-80,0, 80, 20);
		returnbackButton.setBounds(MyFrame.WIDTH-160,0, 80, 20);
		this.add(logoutButton);
		this.add(returnbackButton);
		
		selectionLabel = new JLabel("请选择一项操作：");
		setPromotionButton = new MyButton("设置促销手段");
		setSalesStrategyButton = new MyButton("制定销售策略");
		selectionLabel.setBounds(10, 40, 120, 20);
		setPromotionButton.setBounds(30, 80, 120,20);
		setSalesStrategyButton.setBounds(30, 120, 120, 20);
		this.add(selectionLabel);
		this.add(setPromotionButton);
		this.add(setSalesStrategyButton);
		
		logoutButton.setButtonAction("logout");
		returnbackButton.setButtonAction("logout");
		setPromotionButton.setButtonAction("toSetPromotion");
		setSalesStrategyButton.setButtonAction("toSetSalesStrategy");
	}
	
	@Override
	protected void updateVO() {
		
	}


}
